import { post } from "./http";

// 登录
export const login = (params) => post(`login`, params);

// 首页
export const info = () => post(`info-manage/get`);

// ------------------------歌手----------------------------
// 列表
export const listSinger = (params = {}, pageNum = 1, pageSize = 10) => post(`singer-manage/list`, { ...params, pageNum, pageSize });

// 详情
export const getSinger = (id) => post(`singer-manage/detail`, { id });

// 保存
export const saveSinger = (data) => post(`singer-manage/save`, data);

// 删除
export const delSinger = (ids) => post(`singer-manage/delete`, { ids });

// -----------------------歌曲----------------------------
// 列表
export const listSong = (params = {}, pageNum = 1, pageSize = 10) => post(`song-manage/list`, { ...params, pageNum, pageSize });

// 详情
export const getSong = (data) => post(`song-manage/detail`, data);

// 保存
export const saveSong = (data) => post(`song-manage/save`, data);

// 删除
export const delSong = (data) => post(`song-manage/delete`, data);

// -----------------------评论-----------------------------
// 列表
export const listComment = (params = {}, pageNum = 1, pageSize = 10) => post(`comment-manage/list`, { ...params, pageNum, pageSize });

// 更新有效性
export const updateCommentDataFlag = (id) => post(`comment-manage/update-data-flag`, { id });

// ------------------------歌单----------------------------
// 列表
export const listSongList = (params = {}, pageNum = 1, pageSize = 10) => post(`song-list-manage/list`, { ...params, pageNum, pageSize });

// 删除
export const delSongList = (ids) => post(`song-list-manage/delete`, { ids });

// 内容列表
export const listContent = (params = {}, pageNum = 1, pageSize = 10) => post(`song-list-manage/content`, { ...params, pageNum, pageSize });

// 内容删除
export const delContent = (ids) => post(`song-list-manage/del-content`, { ids });

// -----------------------用户-----------------------------
// 列表
export const listConsumer = (params = {}, pageNum = 1, pageSize = 10) => post(`consumer-manage/list`, { ...params, pageNum, pageSize });

// 更新有效性
export const updateConsumerDataFlag = (id) => post(`consumer-manage/update-data-flag`, { id });

// ----------------------收藏-------------------------------
// 喜爱歌曲列表
export const loveSong = (params = {}, pageNum = 1, pageSize = 10) => post(`collect-manage/love-song`, { ...params, pageNum, pageSize });

// 收藏歌单列表
export const collectSongList = (params = {}, pageNum = 1, pageSize = 10) => post(`collect-manage/collect-song-list`, { ...params, pageNum, pageSize });

// 更新有效性
export const updateLoveSongDataFlag = (data) => post(`collect-manage/change`, data);

// -----------------------视频-----------------------------
// 列表
export const listVideo = (params = {}, pageNum = 1, pageSize = 10) => post(`video-manage/list`, { ...params, pageNum, pageSize });

// 详情
export const getVideo = (id) => post(`video-manage/detail`, { id });

// 保存
export const saveVideo = (data) => post(`video-manage/save`, data);